<template>
	<view class="content">
		<view class="sex_item" @tap='man(1)'>
			<text>男</text>
			<image v-if="courrt==1" src="../../../static/images/a9.png" mode=""></image>
				<image v-if="flag" src="../../../static/images/a10.png" mode=""></image>
		</view>
		<view class="sex_item" @tap='man(2)'>
			<text>女</text>
			<image v-if="courrt==2"  src="../../../static/images/a9.png" mode=""></image>
				<image v-if="!flag"  src="../../../static/images/a10.png" mode=""></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				flag:false,
				courrt:1
			};
		},
		methods:{
			man(index){
				this.flag = !this.flag
				this.courrt = index
				uni.setStorageSync('sex',this.courrt)
			},
	
		}
	}
</script>

<style lang="scss">
	.content{
		background: #f5f5f5;
		height: 100vh;
		.sex_item{
			background: #fff;
			margin-top: 20rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 20rpx;
			text{
				font-size: 28rpx;
			}
			image{
				width: 32rpx;
				height: 32rpx;
			}
		}
	}
</style>
